install target
authorIOhannes m zmölnig <zmoelnig@umlautQ.umlaeute.mur.at>
Thu, 21 Jan 2016 20:22:41 +0000 (21:22 +0100)
committerIOhannes m zmölnig <zmoelnig@umlautQ.umlaeute.mur.at>
Thu, 21 Jan 2016 20:22:41 +0000 (21:22 +0100)
debian/libbuilder/Makefile

index fab6cb74c8e46616757f26de50680dd6cd1a3a5b..bc490fa8e6795585cf67f5a44bb1e7206e545af6 100644 (file)
@@ -1,12 +1,15 @@
-# Automatically generated makefile, created by the Introjucer
-# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!
+# build a dynamic library for juce
+prefix = /usr/local
+libdir = $(prefix)/lib
+includedir = $(prefix)/include
 
 # (this disables dependency generation if multiple architectures are set)
 DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)
 
 empty=
 
-MODULES_PATH=../../modules
+JUCE_PATH=../..
+MODULES_PATH=$(JUCE_PATH)/modules
 
 SOURCES=juce_audio_basics.cpp \
        juce_audio_devices.cpp \
@@ -102,7 +105,7 @@ TARGET := libjuce.so
 
 OBJECTS=$(SOURCES:%.cpp=$(OBJDIR)/%.o)
 
-.PHONY: clean install test
+.PHONY: clean install install-lib install-headers test
 
 $(OUTDIR)/$(TARGET): $(OBJECTS) $(RESOURCES)
        @echo Linking juce_dll
@@ -117,6 +120,18 @@ clean:
        @echo Cleaning juce_dll
        rm -rf build
 
+install-lib: $(OUTDIR)/$(TARGET)
+       @echo Installing juce_dll
+       install -d $(DESTDIR)$(libdir)
+       install -m664 $^ $(DESTDIR)$(libdir)/libjuce.so
+install-headers:
+       @echo Installing juce_dll
+       install -d $(DESTDIR)$(includedir)/juce
+       cd $(JUCE_PATH) && find modules/ -type f -name "juce_*.h" -exec cp --parent {} $(DESTDIR)$(includedir)/juce \;
+       cd $(JUCE_PATH) && find modules/juce_box2d/box2d/ -type f -name "*.h" -exec cp --parent {} $(DESTDIR)$(includedir)/juce \;
+
+install: install-headers install-lib
+
 -include $(OBJECTS:%.o=%.d)
 
 test: